package user;

import book.BookList;
import operation.IOPeration;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YCKOKO
 * Date: 2022-10-22
 * Time: 16:26
 */
public abstract class User {
    protected String name;

    public User(String name){
        this.name = name;
    }

    public abstract int Menu();
    //定义数组但未进行初始化，内存未分配
    protected IOPeration[] ioPerations;

    public void doOperation(int choice, BookList bookList){
        ioPerations[choice].work(bookList);
    }
}
